<h1>Order details</h1>
<?=Html::anchor(Request::$controller . 'orders/', '&larr; back to orders');?>
<br /><br />
<table class="w100">
	<tr>
		<td class="half paddingRight10">
			Order #<?=$order['token']?><br />
			<? if ($order['delivery']): ?>
				Delivery: <strong>OVERNIGHT DELIVERY</strong><br />
			<? endif ?>
			Amount: $<?=$order['amount']?><br />
			Date: <?=$order['dateTimeAdded']?><br />
			Status: <?=($order['isPaid'] == 1 ? 'paid' : 'unpaid')?><br />
			<hr />
			<h3>Member Business<br />Information for Publication:</h3>
			Business Name: <?=Html::chars($order['name']); ?><br />
<!--			State: Html::chars($order['state'])?><br />
			Zip: Html::chars($order['zip'])?><br />
			City: Html::chars($order['city'])?><br />-->
			Business Address: <?=Html::chars($order['address'])?><br />
			Business Phone: <?=Html::chars($order['onsitephone'])?><br />
			Website Address: <?=Html::chars($order['onsitename'])?><br />
			Business Description: <?=nl2br(Html::chars($order['comment']))?><br />
			Business Category: <?=Html::chars($order['category']); ?><br />
			Business Hours: <?=Html::chars($order['hours']); ?><br />
			<hr>
			<h3>Member Contact<br />Information (not for publication)</h3>
			Contact Name: <?=Html::chars($order['customer'])?><br />
			E-mail Address: <?=Html::chars($order['email'])?><br />
			Altirnative Phone Number: <?=Html::chars($order['phone'])?><br />
			Alternative Mailing or<br />Business Information: <?=Html::chars($order['altmail'])?><br />
		</td>
		<td class="half paddingLeft10">
			<?if (count($items)):?>
				<table class="w100">
					<tr>
						<td class="border padding10">
							Item name
						</td>
						<td class="border padding10" style="width: 50px;">
							Quantity
						</td>
						<td class="border padding10" style="width: 50px;">
							Price
						</td>
					</tr>
					<?foreach ($items as $item):?>
					<?if($item['itemId'] != 103): ?>
						<tr>
							<td class="border padding10">
							  <?if($item['price'] != 0.00): ?>
								<?=Html::chars($item['itemName'])?>
								<? if ($item['source'] == 'advertising'): ?>
									(banner)
								<? endif; ?>
							  <? else: ?>
								Discount for: <?=Html::chars($item['itemName'])?>
							  <? endif; ?>
							</td>
							<td class="border padding10" style="width: 50px;">
								<?=$item['quantity']?>
							</td>
							<td class="border padding10" style="width: 50px;">
							  <?if($item['price'] == 50.00): ?>
							  50 %
							  <? else: ?>
							  $ <?=$item['price']?>
							  <? endif; ?>
								
							</td>
						</tr>
					<? endif; ?>
					<?endforeach?>
				</table>
			<?endif?>
		</td>
	</tr>
</table>